#include "mainwindow.h"
#include "UsedHead.h"
#include "userlist.h"
#include "frmlogin.h"
#include <QApplication>
#include "gamesettings.h"

//静态函数
vector<User*> *UserList::userlist = new vector<User*>();

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    UserList ul;
    g_gameSettings.loadSettings();
    int id;
    frmLogin l;// 登录界面
    MainWindow w;// 主页面
    if(l.exec() == QDialog::Accepted)//判断accept()函数
       {
           id = l.getId();
           w.find(id);
           w.show();
           return a.exec();
       }
       else
       {
           return 0;
       }
    g_gameSettings.saveSettings();
    return a.exec();
}
